﻿using System;
using System.Web.UI.WebControls;

namespace Sgf.View.Relatorio.Deposito
{
    public partial class RelDeposito : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        #region -- Botões --
        protected void btnRelatorio_Click(object sender, EventArgs e)
        {
            var pDatainicio = Convert.ToDateTime(txtDataInicio.Text);
            var pDatafim = Convert.ToDateTime(txtDataFim.Text);
            const string relatorio = "repDeposito";
            var pDataFim = pDatafim.ToString("dd/MM/yyyy");
            var pDataInicio = pDatainicio.ToString("dd/MM/yyyy");
            var pUsuarioId = Session["UsuarioId"].ToString();
            var url = string.Format("../RelPreview.aspx?nome={0}&pDataFim={1}&pDataInicio={2}&pUsuarioId={3}",
                relatorio, pDataFim, pDataInicio, pUsuarioId);
            Response.Redirect(url);
        }
        #endregion
    }
}